package com.example.fund.info;

import java.util.HashMap;
import java.util.Map;

public class FundInfo implements Cloneable
{
	private String number;
	private String name;
	private int type;//0-基金;1-指数;2-FOF
	private Map<String,String> actualValues = new HashMap<String,String>();
	private Map<String,String> relativeValues = new HashMap<String,String>();
	private Map<String,String> volumes = new HashMap<String,String>();
	private Map<String,String> periodRise = new HashMap<String,String>();
	private Map<String,Double> fundTradeQtyMap = new HashMap<String,Double>();

	public FundInfo() {
		super();
	}

	public FundInfo(String number, String name) {
		this.number = number;
		this.name = name;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public String getNumber() {
		return number;
	}
	public void setNumber(String number) {
		this.number = number;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Map<String, String> getActualValues() {
		return actualValues;
	}
	public void setActualValues(Map<String, String> actualValues) {
		this.actualValues = actualValues;
	}

	public Map<String, Double> getFundTradeQtyMap() {
		return fundTradeQtyMap;
	}

	public void setFundTradeQtyMap(Map<String, Double> fundTradeQtyMap) {
		this.fundTradeQtyMap = fundTradeQtyMap;
	}

	public Map<String, String> getPeriodRise() {
		return periodRise;
	}
	public void setPeriodRise(Map<String, String> periodRise) {
		this.periodRise = periodRise;
	}
	public Map<String, String> getVolumes() {
		return volumes;
	}
	public void setVolumes(Map<String, String> volumes) {
		this.volumes = volumes;
	}

	public Map<String, String> getRelativeValues() {
		return relativeValues;
	}

	public void setRelativeValues(Map<String, String> relativeValues) {
		this.relativeValues = relativeValues;
	}

	@Override
	public String toString() 
	{
		return name;
	}
	@Override
	public boolean equals(Object obj) 
	{
		 if (this==null || obj==null) return false;
		 if (!(obj instanceof FundInfo)) return false;
		 FundInfo other=(FundInfo)obj;
		 if (this.number.equals(other.number))
		 {
			 return true;
		 }
		 else
		 {
			 return false;
		 }
	}
	
	@Override
	public Object clone() throws CloneNotSupportedException 
	{
		return super.clone();
	}
	
}
